<?php
namespace Common\Service;
use Think\Model;

class UserService extends Model{

	protected $autoCheckFields = false;
	
	private $userModel = null;
	
	function __construct() {
		
		parent::__construct();
		
		$this->userModel = D("User");
	}
	
	/*
	* 获取用户详细信息
	* @access public
	* @param $userId 用户编号
	* @return 用户详细信息
	* =====================================================*/
	public function getUserInfo($userId){
		$userInfo = null;
		if (!empty($userId)){
			$condition["id"] = (int)$userId;
			$userInfo = $this->userModel->scope("detail")->where($condition)->find();
		}
		return $userInfo;
	}
}